package org.insia.smartposse.metier;

import java.io.Serializable;

import org.insia.smartposse.metier.webservice.LightFreelanceSkill;

/**
 * Business class for a freelance's skill
 * 
 * @author sok hout
 *
 */
public class FreelanceSkill 
implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8415735551839544785L;
	private long _id = -1L;
	private Freelance _freelance;
	private Skill _skill;
	private int _rate;
	private int _preference;
	
	/**
	 * Empty constructor.
	 *
	 */
	public FreelanceSkill() {
	}

	/**
	 * Getter for the freelance.
	 * @return the freelance.
	 */
	public Freelance getFreelance() {
		return _freelance;
	}

	/**
	 * Setter for the freelance.
	 * @param freelance the freelance to set.
	 */
	public void setFreelance(Freelance freelance) {
		this._freelance = freelance;
	}

	/**
	 * Getter for the id.
	 * @return the id.
	 */
	public long getId() {
		return _id;
	}

	/**
	 * Setter for the id.
	 * @param id the id.
	 */
	public void setId(long id) {
		this._id = id;
	}

	/**
	 * Getter for the preference order number of this skill.
	 * @return the order number.
	 */
	public int getPreference() {
		return _preference;
	}

	/**
	 * Setter for the order number.
	 * @param order the order number to set.
	 */
	public void setPreference(int preference) {
		this._preference = preference;
	}

	/**
	 * Getter for the rate for the skill.
	 * @return the rate.
	 */
	public int getRate() {
		return _rate;
	}

	/**
	 * Setter for the rate of the skill.
	 * @param rate the rate to set.
	 */
	public void setRate(int rate) {
		this._rate = rate;
	}

	/**
	 * Getter for the skill.
	 * @return the skill.
	 */
	public Skill getSkill() {
		return _skill;
	}

	/**
	 * Setter for the skill.
	 * @param skill the skill to set.
	 */
	public void setSkill(Skill skill) {
		this._skill = skill;
	}
	/**
	 * 
	 * @return lcatet the webservice FreelanceSkill representation
	 */
	public LightFreelanceSkill setLight() {
		LightFreelanceSkill lfreeSkill = new LightFreelanceSkill(this);
		return lfreeSkill;
	}
}
